package org.example.bookingsystem.service;

import org.example.bookingsystem.mapper.SystemMapper;
import org.example.bookingsystem.model.Order;
import org.example.bookingsystem.model.Ticket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class SystemService {
    @Autowired
    private SystemMapper systemMapper;
    public List<Ticket> selectAllTickets(){
        return systemMapper.selectAllTickets();
    }

    public int selectTicketCost(int tid){
        return systemMapper.selectTicketCost(tid);
    }

    public int addOrder(int uid, int tid, int cost, Date createTime, int payType){
        return systemMapper.addOrder(uid, tid, cost, createTime, payType);
    }

    public List<Order> selectOrder(int uid){
        return systemMapper.selectOrder(uid);
    }
    public int updatepoll(int tid){
        return systemMapper.updatepoll(tid);
    }
}
